package com.base.cn.platform.os.service.manage.op.keyword;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 敏感词接口
 * @author zsw
 * @create 2018-04-19
 */
@FeignClient(name = BaseService.appName , configuration = FeignAuthConfig.class)
public interface OpKeywordService extends BaseService {

    /**
     * 获取所有的敏感词
     * @return 数据
     */
    @RequestMapping(contextPath + "/op/findAllKeyword")
    String findAllKeyword();

    /**
     * 敏感词数量
     * @author zsw
     * @create 2018-4-19
     */
    @RequestMapping(contextPath + "/op/keywordCount")
    BigDecimal count(@RequestBody Map<String, Object> keyword);

    /**
     * 查询敏感词列表
     * @param currentPage 分页
     * @param keyword 查询条件
     * @create 2018-4-19
     */
    @RequestMapping(contextPath + "/op/queryKeywordList")
    Map<String, Object> queryKeywordList(@RequestParam(value = "currentPage", required = false, defaultValue = "1") int currentPage,
                                         @RequestBody Map<String, Object> keyword,
                                         @RequestParam("sysUserData") boolean sysUserData);

    /**
     * 保存敏感词
     * @param keyword 敏感词实体
     * @create 2018-4-19
     */
    @RequestMapping(contextPath + "/op/saveKeyword")
    Map<String, Object> saveKeyword(@RequestBody Map<String, Object> keyword);

    /**
     * 删除敏感词
     * @param keywordIds 敏感词id串
     * @create 2018-4-19
     */
    @RequestMapping(contextPath + "/op/deleteKeyword")
    Map<String,Object> deleteKeyword(@RequestParam("keywordIds") String keywordIds);
}
